<div class="menu1" xmlns="http://www.w3.org/1999/xhtml"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<f:subview id="no_messages" rendered="#{!historyMessages.rowAvailable}">
	<p>还没有对该商品的评论.</p>
</f:subview> 

<f:subview id="historyMessages" rendered="#{historyMessages.rowAvailable}">
	<h:dataTable value="#{historyMessages}" var="item"
		styleClass="dvdtable" headerClass="dvdtablehead"
		rowClasses="dvdtableodd,dvdtableeven" columnClasses="dvdtablecol">
		<h:column>
			<f:facet name="header">评论</f:facet>
					#{item.content}
				</h:column>
		<h:column>
			<f:facet name="header">评论人</f:facet>
					#{item.customer.customerName}
				</h:column>
		<h:column>
			<f:facet name="header">评论日期</f:facet>
					#{item.messageDate}	
				</h:column>
	</h:dataTable>
</f:subview> 

<f:subview>
	<h:form>
		<div class="formRow"><h:inputTextarea id="content"
			 value="#{messageInfo.content}" cols="60" rows="5" required="true" />
		<div class="validationError"><h:message for="content" /></div>
		</div>
		<f:subview id="loggedin" rendered="#{identity.loggedIn}">
			<h:commandButton action="#{messageInfo.submitMessage}" value="我要留言" />
		</f:subview>

		<f:subview id="notloggedin" rendered="#{!identity.loggedIn}">
			<p class="warning">登陆后才能留言！</p>
		</f:subview>
	</h:form>
</f:subview></div>

